package com.itheima.manage.excepiton;

import lombok.Getter;
import lombok.NoArgsConstructor;

/**
 * @author yaohu
 * @date 2021/12/3
 * @Version 1.0
 * @describe
 */
@Getter
@NoArgsConstructor
public class BusinessException extends RuntimeException {

    private ErrorResult errorResult;

    public BusinessException(ErrorResult errorResult) {
        super(errorResult.getErrMessage());
        this.errorResult = errorResult;
    }
}
